package data.base;

/**
 * This class represents a set of barycentric
 * coordinates in a triangle.
 * @author Simon
 *
 */
public class Bary3 extends Vector3{
  
  public static final int _A = 0;
  public static final int _B = 1;
  public static final int _C = 2;
  
  /**
   * Constructs a new set of barycentric coordinates.
   * The sum of all parameters has to be 1.
   * @param a Weight of point A
   * @param b Weight of point B
   * @param c Weight of point C
   */
  public Bary3(double a, double b, double c) {
    super(a, b, c);
  }

  /**
   * @return the weight of point A
   */
  public double getA(){
    return get(_A);
  }
  
  /**
   * @return the weight of point B
   */
  public double getB(){
    return get(_B);
  }
  
  /**
   * @return the weight of point C
   */
  public double getC(){
    return get(_C);
  }
}
